package com.example.springcloudauth;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;

@SpringBootApplication
@EnableDiscoveryClient
@EnableResourceServer
public class SpringCloudAuthApplication {

    /**
     * 获取token的方式：
     * http://localhost:8057/oauth/token?username=user_1&password=123456&grant_type=password&scope=server&client_id=client_2&client_secret=123456
     *
     * 或者改成 post 请求
     * form-data 参数格式也可以进行请求
     *
     * 访问的方式(获取用户的登入信息)：
     * http://localhost:8057/users/current?access_token=65c1f107-aa66-4ac7-81a9-06ebe6ea710f
     *
     * @param args
     */
    public static void main(String[] args) {
        SpringApplication.run(SpringCloudAuthApplication.class, args);
    }

}
